跳到主要内容

GetLayout

Returns a layout of the current slide.

Syntax

expression.GetLayout();

expression - A variable that represents a ApiSlide class.

Parameters

This method doesn't have any parameters.

Returns

ApiLayout | null

Example

This example shows how to get a layout of the current slide.

var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
var oLayout = oSlide.GetLayout();
var oFill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
oLayout.SetBackground(oFill);
oSlide.FollowLayoutBackground();